import request from '@/utils/request'
// getlist
export const getlist = (params) => request.get('api/owner/page', { params })
// del
export const del = id => request.delete('/api/owner', { params: { 'ids[]': id } })
// 获取detail 详情信息
export const detailinfo = id => request.get(`/api/owner/detail/${id}`)
// 获取 库位信息
export const getlocationinfo = params => request.get('/api/ownerLocation/pageDetail', { params })
// 查看详情 获取货主信息
export const detail = id => request.get(`/api/owner/detail/${id}`)
// 新增货主
// 修改货主信息
export const put = data => request.put('api/owner', data)
// 获取新增code
export const getCode = () => request.get('api/codeFactory/next/HZ')
// 新增货主
export const add = (data) => request.post('api/owner', data)
// 获得 货主库位信息
export const getownerLocationlist = (params) => request.get('api/ownerLocation/pageDetail', { params })
// 获取所有仓库启用的仓库
export const getwarehouselist = () => request.get('api/warehouse/list?status=1')
// 查询库区库位树
export const tree = id => request.get(`api/area/tree?仓库id=${id}`)
// 删除货主库位关联表
export const delOwnerArea = id => request.delete('/api/ownerLocation', { params: { 'ids[]': id } })
// 给货主分配库位
export const fenpei = data => request.post('api/ownerLocation/batch', data)
